package org.hqs.feign.clients;

import org.hqs.feign.common.JsonResult;
import org.hqs.feign.pojo.Clinic;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "clinicservice")
public interface ClinicClient {
    @GetMapping("/clinic/{orderId}")
    public JsonResult<Clinic>  queryClinicById(@PathVariable("orderId") Long orderId);

    @GetMapping("/clinic/all")
    public JsonResult<List<Clinic>> getAllClinics();

    @PostMapping("/clinic/add")
    public JsonResult addClinic(@RequestBody Clinic clinic);

    @PutMapping("/clinic/update")
    public JsonResult updateClinic(@RequestBody Clinic clinic);

    @DeleteMapping("/clinic/delete/{clinicId}")
    public JsonResult deleteClinic(@PathVariable("clinicId") Long clinicId);

    @GetMapping("/clinic/find_by_department_id/{departmentId}")
    public JsonResult<List<Clinic>> findClinicByDepartmentId(@PathVariable("departmentId") Long departmentId);
}
